﻿#pragma once


namespace $RootNamespace$
{

	class $Request$
	{
	private:
		int _data;

	public:
		const int getTarget();
		$Request$(int data);
	};
	// "$Handler$" 
	class $Handler$
	{
	protected:
		virtual bool CanHandle($Request$*) = 0;
		$Handler$ *successor;
	public:
		static void Test();
		void SetSuccessor($Handler$ *successor);

		virtual void HandleRequest($Request$*) = 0;
	};

	// "$ConcreteHandlerA$" 
	class $ConcreteHandlerA$ : public $Handler$
	{
	protected:
		virtual bool CanHandle($Request$*);
	public:
		virtual void HandleRequest($Request$ *request);
	};

	// "$ConcreteHandlerB$" 
	class $ConcreteHandlerB$ : public $Handler$
	{
	protected:
		virtual bool CanHandle($Request$*);
	public:
		virtual void HandleRequest($Request$ *request);
	};

	// "$ConcreteHandlerC$" 
	class $ConcreteHandlerC$ : public $Handler$
	{
	protected:
		virtual bool CanHandle($Request$*);
	public:
		virtual void HandleRequest($Request$ *request);
	};

}
